{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np  # 矩阵操作\n",
    "import pandas as pd # SQL数据处理\n",
    "\n",
    "from sklearn.metrics import r2_score  #评价回归预测模型的性能\n",
    "\n",
    "import matplotlib.pyplot as plt   #画图\n",
    "import seaborn as sns\n",
    "\n",
    "# 图形出现在Notebook里而不是新窗口\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>instant</th>\n",
       "      <th>season_1</th>\n",
       "      <th>season_2</th>\n",
       "      <th>season_3</th>\n",
       "      <th>season_4</th>\n",
       "      <th>mnth_1</th>\n",
       "      <th>mnth_2</th>\n",
       "      <th>mnth_3</th>\n",
       "      <th>mnth_4</th>\n",
       "      <th>mnth_5</th>\n",
       "      <th>...</th>\n",
       "      <th>weekday_5</th>\n",
       "      <th>weekday_6</th>\n",
       "      <th>temp</th>\n",
       "      <th>atemp</th>\n",
       "      <th>hum</th>\n",
       "      <th>windspeed</th>\n",
       "      <th>holiday</th>\n",
       "      <th>workingday</th>\n",
       "      <th>yr</th>\n",
       "      <th>cnt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.355170</td>\n",
       "      <td>0.373517</td>\n",
       "      <td>0.828620</td>\n",
       "      <td>0.284606</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>985</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.379232</td>\n",
       "      <td>0.360541</td>\n",
       "      <td>0.715771</td>\n",
       "      <td>0.466215</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>801</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.171000</td>\n",
       "      <td>0.144830</td>\n",
       "      <td>0.449638</td>\n",
       "      <td>0.465740</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1349</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.175530</td>\n",
       "      <td>0.174649</td>\n",
       "      <td>0.607131</td>\n",
       "      <td>0.284297</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1562</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.209120</td>\n",
       "      <td>0.197158</td>\n",
       "      <td>0.449313</td>\n",
       "      <td>0.339143</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1600</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 35 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   instant  season_1  season_2  season_3  season_4  mnth_1  mnth_2  mnth_3  \\\n",
       "0        1         1         0         0         0       1       0       0   \n",
       "1        2         1         0         0         0       1       0       0   \n",
       "2        3         1         0         0         0       1       0       0   \n",
       "3        4         1         0         0         0       1       0       0   \n",
       "4        5         1         0         0         0       1       0       0   \n",
       "\n",
       "   mnth_4  mnth_5  ...   weekday_5  weekday_6      temp     atemp       hum  \\\n",
       "0       0       0  ...           0          1  0.355170  0.373517  0.828620   \n",
       "1       0       0  ...           0          0  0.379232  0.360541  0.715771   \n",
       "2       0       0  ...           0          0  0.171000  0.144830  0.449638   \n",
       "3       0       0  ...           0          0  0.175530  0.174649  0.607131   \n",
       "4       0       0  ...           0          0  0.209120  0.197158  0.449313   \n",
       "\n",
       "   windspeed  holiday  workingday  yr   cnt  \n",
       "0   0.284606        0           0   0   985  \n",
       "1   0.466215        0           0   0   801  \n",
       "2   0.465740        0           1   0  1349  \n",
       "3   0.284297        0           1   0  1562  \n",
       "4   0.339143        0           1   0  1600  \n",
       "\n",
       "[5 rows x 35 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# path to where the data lies\n",
    "#dpath = './data/'\n",
    "df = pd.read_csv(\"FE_day.csv\")\n",
    "\n",
    "#通过观察前5行，了解数据每列（特征）的概况\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 从原始数据中分离输入特征x和输出y\n",
    "y = df[\"cnt\"]\n",
    "\n",
    "X = df.drop([\"cnt\", \"instant\"], axis = 1)\n",
    "\n",
    "#特征名称，用于后续显示权重系数对应的特征\n",
    "feat_names = X.columns"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# \t要求3 对全体数据，随机选择其中80%做训练数据，剩下20%为测试数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(584, 33)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#将数据分割训练数据与测试数据\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "# 随机采样20%的数据构建测试样本，其余作为训练样本\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=33, test_size=0.2)\n",
    "X_train.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# \t用训练数据训练最小二乘线性回归模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>coef</th>\n",
       "      <th>columns</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>2530.670058</td>\n",
       "      <td>temp</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>2019.092555</td>\n",
       "      <td>yr</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>1096.625843</td>\n",
       "      <td>atemp</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>903.819561</td>\n",
       "      <td>weathersit_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>839.987713</td>\n",
       "      <td>season_4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>776.592967</td>\n",
       "      <td>mnth_9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>413.961130</td>\n",
       "      <td>weathersit_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>335.218767</td>\n",
       "      <td>mnth_5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>307.860502</td>\n",
       "      <td>mnth_6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>238.607786</td>\n",
       "      <td>weekday_6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>221.598038</td>\n",
       "      <td>mnth_8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>213.377427</td>\n",
       "      <td>workingday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>194.398815</td>\n",
       "      <td>mnth_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>182.474431</td>\n",
       "      <td>mnth_10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>76.749983</td>\n",
       "      <td>season_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>75.287884</td>\n",
       "      <td>weekday_5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>64.465256</td>\n",
       "      <td>weekday_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>52.907066</td>\n",
       "      <td>weekday_4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>48.757131</td>\n",
       "      <td>mnth_4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>-35.279334</td>\n",
       "      <td>weekday_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-137.876425</td>\n",
       "      <td>season_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>-193.271274</td>\n",
       "      <td>weekday_0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>-202.717383</td>\n",
       "      <td>weekday_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>-258.713938</td>\n",
       "      <td>holiday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>-275.895678</td>\n",
       "      <td>mnth_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>-293.012896</td>\n",
       "      <td>mnth_7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-350.267803</td>\n",
       "      <td>mnth_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>-563.610563</td>\n",
       "      <td>mnth_11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>-584.113711</td>\n",
       "      <td>mnth_12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-778.861271</td>\n",
       "      <td>season_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>-1199.338650</td>\n",
       "      <td>windspeed</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>-1317.780691</td>\n",
       "      <td>weathersit_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>-1361.378613</td>\n",
       "      <td>hum</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           coef       columns\n",
       "26  2530.670058          temp\n",
       "32  2019.092555            yr\n",
       "27  1096.625843         atemp\n",
       "16   903.819561  weathersit_1\n",
       "3    839.987713      season_4\n",
       "12   776.592967        mnth_9\n",
       "17   413.961130  weathersit_2\n",
       "8    335.218767        mnth_5\n",
       "9    307.860502        mnth_6\n",
       "25   238.607786     weekday_6\n",
       "11   221.598038        mnth_8\n",
       "31   213.377427    workingday\n",
       "6    194.398815        mnth_3\n",
       "13   182.474431       mnth_10\n",
       "1     76.749983      season_2\n",
       "24    75.287884     weekday_5\n",
       "22    64.465256     weekday_3\n",
       "23    52.907066     weekday_4\n",
       "7     48.757131        mnth_4\n",
       "21   -35.279334     weekday_2\n",
       "2   -137.876425      season_3\n",
       "19  -193.271274     weekday_0\n",
       "20  -202.717383     weekday_1\n",
       "30  -258.713938       holiday\n",
       "5   -275.895678        mnth_2\n",
       "10  -293.012896        mnth_7\n",
       "4   -350.267803        mnth_1\n",
       "14  -563.610563       mnth_11\n",
       "15  -584.113711       mnth_12\n",
       "0   -778.861271      season_1\n",
       "29 -1199.338650     windspeed\n",
       "18 -1317.780691  weathersit_3\n",
       "28 -1361.378613           hum"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 线性回归\n",
    "#class sklearn.linear_model.LinearRegression(fit_intercept=True, normalize=False, copy_X=True, n_jobs=1)\n",
    "from sklearn.linear_model import LinearRegression\n",
    "\n",
    "# 1.使用默认配置初始化学习器实例\n",
    "lr = LinearRegression()\n",
    "\n",
    "# 2.用训练数据训练模型参数\n",
    "lr.fit(X_train, y_train)\n",
    "\n",
    "# 3. 用训练好的模型对测试集进行预测\n",
    "y_test_pred_lr = lr.predict(X_test)\n",
    "y_train_pred_lr = lr.predict(X_train)\n",
    "\n",
    "\n",
    "# 看看各特征的权重系数，系数的绝对值大小可视为该特征的重要性\n",
    "fs = pd.DataFrame({\"columns\":list(feat_names), \"coef\":list((lr.coef_.T))})\n",
    "fs.sort_values(by=['coef'],ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The r2 score of LinearRegression on test is 0.827786881835\n",
      "The r2 score of LinearRegression on train is 0.850701913839\n"
     ]
    }
   ],
   "source": [
    "# 使用r2_score评价模型在测试集和训练集上的性能，并输出评估结果\n",
    "from sklearn.metrics import r2_score\n",
    "#测试集\n",
    "print 'The r2 score of LinearRegression on test is', r2_score(y_test, y_test_pred_lr)\n",
    "#训练集\n",
    "print 'The r2 score of LinearRegression on train is', r2_score(y_train, y_train_pred_lr)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 根据作业要求4 评价最小二乘线性回归模型，评价指标为RMSE。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The RMSE score of LinearRegression on test is 814.854808811\n",
      "The RMSE score of LinearRegression on train is 745.119133403\n"
     ]
    }
   ],
   "source": [
    "# 使用RMSE评价模型在测试集和训练集上的性能，并输出评估结果\n",
    "from sklearn.metrics import mean_squared_error\n",
    "import math\n",
    "#测试集\n",
    "\n",
    "print 'The RMSE score of LinearRegression on test is', math.sqrt(mean_squared_error(y_test, y_test_pred_lr))\n",
    "#训练集\n",
    "print 'The RMSE score of LinearRegression on train is', math.sqrt(mean_squared_error(y_train, y_train_pred_lr))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAekAAAFsCAYAAADos0H8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHq1JREFUeJzt3X+8VHW97/HXR9hCRwREN4YQgaXmT8C2Brc0ilILE8/j\nVto1pSNJD/txrW6dNG9JVufU1Vs3b5463iwxLVFOHTz16KSX5Fje0qDINDTINFECpPyBZQp+7h+z\noAH2Zs/eezb7C/N6Ph7zmLW+a82a7/rOnnnPd63vXhOZiSRJKs9eA10BSZLUOUNakqRCGdKSJBXK\nkJYkqVCGtCRJhTKkJUkqlCGtlhcR90bE9IGux0CKiL+NiIcjYmNETNmFz7sxIg7uYtk7IuJHTXqe\nByPidc3YlrQrGdLao3X24bz9h39mHpmZS7rZzoSIyIgY3E9VHWiXA+/NzGGZ+fPtF1b7/nQVqo9E\nxOciYlBfn7R6vgf6uh1pT2VISwUoIPxfDNzbzTqTMnMY8GrgDODcfq+V1OIMabW8+t52RBwfEUsj\n4smIWBsRn6tWu726f7zqTU6LiL0i4r9HxEMRsS4iro2IEXXbPadatiEiPrbd88yLiIURcV1EPAm8\no3ruH0fE4xGxJiK+GBF7120vI+LdEbE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13vOMdLFy4cOv8sGHDANi4cSMzZszg2GOP5eijj2bRokU71G3NmjWceOKJTJ48maOOOoof\n/vCHDe3TkiVLOPXUUwGYN28e5557LtOnT+fggw/eJryvu+46jj/+eCZPnsy73vWurcF7/vnn09HR\nwZFHHrm1DaB2yetLL72UV73qVdx0000N1aVRHu6WJG1j8+bNLF68mDlz5gBwyy23sHLlSu666y4y\nk9NOO43bb7+d9evXc9BBB/Hd734XgCeeeGKb7axZs4ZLLrmEZcuWMWLECF7zmtcwZcqUnT730KFD\n+fa3v83w4cN57LHHmDp1Kqeddto2g7C+8Y1vcPLJJ3PxxRezefNm/vSnP/VqP++77z5uu+02nnrq\nKQ477DDOP/98Vq1axYIFC7jjjjtoa2vj3e9+N9dffz3nnHMOn/70pxk1ahSbN29mxowZ3H333Rxz\nzDFb6/2jH/2oV/XYGUNakgTAn//8ZyZPnsyDDz7Iy1/+cl7/+tcDtZC+5ZZbtgbsxo0bWblyJSec\ncAIf+tCH+MhHPsKpp57KCSecsM327rzzTqZPn057e+0Hn8444wx+/etf77QOmclHP/pRbr/9dvba\nay8eeeQR1q5dywtf+MKt6xx33HGce+65PPfcc5x++ulMnjy5V/s7c+ZMhgwZwpAhQxg9ejRr165l\n8eLFLFu2jOOOO25rm4wePRqAG2+8kauuuopNmzaxZs0afvWrX20N6TPOOKNXdeiOh7slScBfz0k/\n9NBDPPvss1vPSWcmF110EcuXL2f58uWsWrWKOXPmcOihh7Js2TKOPvpoLrroIi699NIdttnVvyEN\nHjyY559/fuv2n332WQCuv/561q9fz7Jly1i+fDkHHnjgDv9rfOKJJ3L77bczduxYzj77bK699tpe\n7e+QIUO2Tg8aNIhNmzaRmcyePXvrvt5///3MmzeP3/72t1x++eUsXryYu+++m5kzZ25Tr3322adX\ndeiOPWlJfdLoKORmj1ZW/xkxYgRXXHEFs2bN4vzzz+fkk0/mYx/7GGeddRbDhg3jkUceoa2tjU2b\nNjFq1Cje/va3M2zYMK655ppttvOKV7yCCy64gA0bNjB8+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70XEacAHwFOy8w/1S26GTizGs04ETiE2uC4Ti8JW4X7bcCbq8fPZjdpg51o9TZoxcv/3kztdYNt\nX78efSbs6kr3RvVZdTWwIjM/V7eoldqgPar/aImIFwCvo3Zuvqv3cX3bvBn4QfW+7+qzom+aPVJu\nd7tR+wZ5D3A38G/A2PzriL8rqZ2b+CXbjvg9l9qggFXA39WVd1Tb+g3wRaorupV+q/bjYWB5dfty\n3bKLq/25n7rR6tRGef66WnZxXfnB1R/mKuAmYMhA71+DbfC31L4J/wVYS+2LV0u1wU7aptP93BNu\nwDeBNcBz1es/h9r5xcXAyup+VLVujz8TSr8Br6J2SPbuuvf/G1usDY4Bfl61wT3Ax6vyTt/HwNBq\nflW1/OC6bXX6WdGXm5cFlSSpUC1/uFuSpFIZ0pIkFcqQliSpUIa0JEmFMqQlSSqUIS1JUqEMaUmS\nCvX/Ae3v29493FRpAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xed05ef0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#在训练集上观察预测残差的分布，看是否符合模型假设：噪声为0均值的高斯噪声\n",
    "f, ax = plt.subplots(figsize=(7, 5)) \n",
    "f.tight_layout() \n",
    "ax.hist(y_train - y_train_pred_lr, bins=40, label='Residuals Linear', color='b', alpha=.5); \n",
    "ax.set_title(\"Histogram of Residuals\") \n",
    "ax.legend(loc='best');"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VNX5+PHPM5NJMmGbgEEggqBSFFxAqKDUBVxwF8Fd\nW61rd7X+sNhat+pXLHWp7ffbYqsWKyqKNlpti7ZirbRYQUBURFEUCKAISVgySSYz5/fH3AmTyb0z\nd7Zk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/4H8JH1d19rfwH+17pWq4Bxcce6nOhD27XANzv6\ns+XhWh3Hniy+/YjeGNYCzwAl1vZS6/u11uv7xb3/J9Z1WwOc0tGfJw/XZzSw1PpZqiKahac/R3s+\n1+3AB8C7wB+JZuLpz1HCHy11pJRSqiDpEJ9SSqmCpAFKKaVUQdIApZRSqiBpgFJKKVWQNEAppZQq\nSEWpd1FKpUNEYunUAAOAMNHSPwBHmGidx45o12Sg3kTr3SlV8DRAKZVjxphtROcBISK3AbuMMb+I\n38eaoCnGmEjbI+TNZOBLQAOU6hR0iE+pdiIiB1jr//wWeBsYLCK1ca9fICKxKul7i8hzIrJURP5r\nVVhIPF6RiNxvHfMdEfmOtX2jiNxmFWp9R0S+IiL7A1cCM0RkhYgc1T6fWqnMaQ9KqfY1kmhFhG/F\n1V2z8yDwc2PMEquy/IvAwQn7fJtosdHDjDFhEekb99rnxpgxIvID4IfW+X4PfGmMeSBnn0apPNIA\npVT7+tgY85aL/U4ARkRHAgEoFxG/MSaYsM8DxpgwgDFme9xrsUK/y4iWq1Kq09EApVT72h33dYTW\nSyaUxn0tpE6oEJyXV2i0/g6j/89VJ6XPoJTqIFaCRI2IDBcRD3B23Mt/B74b+0ZERtsc4mXg2yLi\ntfbpa7NPvJ1Ar+xarVT70QClVMf6EfA3omnpG+O2fxeYaCU5vA9cZfPeOcAW4B0RWQmcl+JczwPn\nWckTmiShCp5WM1dKKVWQtAellFKqIGmAUkopVZA0QCmllCpIGqCUUkoVJA1QSimlCpIGKKWUUgVJ\nA5RSSqmC9P8BqlF8zEUSaQAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xeecf4a8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#还可以观察预测值与真值的散点图\n",
    "plt.figure()\n",
    "plt.scatter(y_train, y_train_pred_lr)\n",
    "plt.plot([0, 9000], [0, 9000], '--k')   #数据已经标准化，3倍标准差即可\n",
    "plt.axis('tight')\n",
    "plt.xlabel('True cnt')\n",
    "plt.ylabel('Predicted cnt')\n",
    "plt.tight_layout()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# \t用训练数据训练岭回归模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The RMSE score of RidgeCV on test is 811.417221198\n",
      "The RMSE score of RidgeCV on train is 746.292901722\n"
     ]
    }
   ],
   "source": [
    "#岭回归／L2正则\n",
    "#class sklearn.linear_model.RidgeCV(alphas=(0.1, 1.0, 10.0), fit_intercept=True, \n",
    "#                                  normalize=False, scoring=None, cv=None, gcv_mode=None, \n",
    "#                                  store_cv_values=False)\n",
    "from sklearn.linear_model import  RidgeCV\n",
    "\n",
    "#1. 设置超参数（正则参数）范围\n",
    "alphas = [ 0.01, 0.1, 1, 10,100]\n",
    "#n_alphas = 20\n",
    "#alphas = np.logspace(-5,2,n_alphas)\n",
    "\n",
    "#2. 生成一个RidgeCV实例\n",
    "ridge = RidgeCV(alphas=alphas, store_cv_values=True)  \n",
    "\n",
    "#3. 模型训练\n",
    "ridge.fit(X_train, y_train)    \n",
    "\n",
    "#4. 预测\n",
    "y_test_pred_ridge = ridge.predict(X_test)\n",
    "y_train_pred_ridge = ridge.predict(X_train)\n",
    "\n",
    "\n",
    "# 评估，使用RMSE_score评价模型在测试集和训练集上的性能\n",
    "print 'The RMSE score of RidgeCV on test is', math.sqrt(mean_squared_error(y_test, y_test_pred_ridge))\n",
    "print 'The RMSE score of RidgeCV on train is', math.sqrt(mean_squared_error(y_train, y_train_pred_ridge))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The RMSE score of RidgeCV on test is 811.417221198\n",
      "The RMSE score of RidgeCV on train is 746.292901722\n"
     ]
    }
   ],
   "source": [
    "#岭回归／L2正则\n",
    "#class sklearn.linear_model.RidgeCV(alphas=(0.1, 1.0, 10.0), fit_intercept=True, \n",
    "#                                  normalize=False, scoring=None, cv=None, gcv_mode=None, \n",
    "#                                  store_cv_values=False)\n",
    "from sklearn.linear_model import  RidgeCV\n",
    "\n",
    "#1. 设置超参数（正则参数）范围\n",
    "alphas = [ 0.01, 0.1, 1, 10,100]\n",
    "#n_alphas = 20\n",
    "#alphas = np.logspace(-5,2,n_alphas)\n",
    "\n",
    "#2. 生成一个RidgeCV实例\n",
    "ridge = RidgeCV(alphas=alphas, store_cv_values=True,scoring='neg_mean_squared_error')  \n",
    "\n",
    "#3. 模型训练\n",
    "ridge.fit(X_train, y_train)    \n",
    "\n",
    "#4. 预测\n",
    "y_test_pred_ridge = ridge.predict(X_test)\n",
    "y_train_pred_ridge = ridge.predict(X_train)\n",
    "\n",
    "\n",
    "# 评估，使用RMSE_score评价模型在测试集和训练集上的性能\n",
    "print 'The RMSE score of RidgeCV on test is', math.sqrt(mean_squared_error(y_test, y_test_pred_ridge))\n",
    "print 'The RMSE score of RidgeCV on train is', math.sqrt(mean_squared_error(y_train, y_train_pred_ridge))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEKCAYAAADuEgmxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8lOW9/vHPNwthD1sg7CSyrwIhiGDdK9i6a0VFQEG0\nrba2x7Zaz6+29pyettr2tFVrJSiLoLiLVsRdQWVJWEOQLWEJCSTsa0KW+/fHDDYHE5hAZp7JzPV+\nvfLKLHdmrjxJ5sqzzP2Ycw4REZFAxHgdQERE6g+VhoiIBEylISIiAVNpiIhIwFQaIiISMJWGiIgE\nTKUhIiIB87Q0zOxZMysys+wa7r/IzA6Y2Ur/x69CnVFERP4tzuPnnw48Acw8xZiFzrnvhiaOiIic\niqel4Zz7zMy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2Kdc7lhvq5nXPFQKGZjQz1c0v0UWmInMT/LtrHzCzb\nfOcqudl/e4x/qoi1Zva2mb1jZjf6v+w2qrwL3cz+4Z8Yca2Z/aaG5zlsZn8ys+Vm9qGZJVW5+yYz\nW2pmG8zsAv/4bma20D9+uZmdX2X8G/4MIkGl0hD5puuBc4FBwGXAY/7pNa4HugEDgMnAiCpfMxLI\nqnL9YedcGjAQuNDMBlbzPE2A5c65IcCnwCNV7otzzqUD91e5vQi43D/+ZuBvVcZnAhfU/lsVqZ2o\nmLBQpJZG4ZvptQLYZWafAsP8t7/snKsEdprZx1W+pj1QXOX69/xT1cf57+uLb9qHqiqBuf7LzwNV\nJ547cTkLX1EBxANPmNm5QAXQs8r4InxTuYgElUpD5JtqOhnSqU6SdAzffFKYWQrwADDMObfPzKaf\nuO80qs7pU+r/XMG//05/gm++r0H4thKUVBnf0J9BJKi0eUrkmz4DbjazWP9+hm/hm1RwEb4TFMWY\nWTt8p/s8YR3Q3X+5OXAEOOAfN6aG54nBN8MtwK3+xz+VRKDQv6ZzO77Tt57Qk/CY4VginNY0RL7p\ndXz7K1bh++//5865nWb2KnApvhfnDfjOlnbA/zX/wlciHzjnVpnZCnwzoOYCn9fwPEeAfmaW5X+c\nm0+T6yngVTO7Cd8MtEeq3HexP4NIUGmWW5FaMLOmznemttb41j5G+gulEb4X8pH+fSGBPNZh51zT\nOsr1GXCNc25fXTyeSE20piFSO2+bWQugAfBb59xOAOfcMTN7BN95mLeFMpB/E9qfVRgSClrTEBGR\ngGlHuIiIBEylISIiAVNpiIhIwFQaIiISMJWGiIgETKUhIiIB+//PQHeQcJw2oAAAAABJRU5ErkJg\ngg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x111e12b0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('alpha is:', 1.0)\n"
     ]
    }
   ],
   "source": [
    "mse_mean = np.mean(ridge.cv_values_, axis = 0)\n",
    "plt.plot(np.log10(alphas), mse_mean.reshape(len(alphas),1)) \n",
    "\n",
    "#这是为了标出最佳参数的位置，不是必须\n",
    "#plt.plot(np.log10(ridge.alpha_)*np.ones(3), [0.28, 0.29, 0.30])\n",
    "\n",
    "plt.xlabel('log(alpha)')\n",
    "plt.ylabel('mse')\n",
    "plt.show()\n",
    "\n",
    "print ('alpha is:', ridge.alpha_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>coef_lr</th>\n",
       "      <th>coef_ridge</th>\n",
       "      <th>columns</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>2530.670058</td>\n",
       "      <td>1791.118786</td>\n",
       "      <td>temp</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>2019.092555</td>\n",
       "      <td>2019.888220</td>\n",
       "      <td>yr</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>1096.625843</td>\n",
       "      <td>1546.564606</td>\n",
       "      <td>atemp</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>903.819561</td>\n",
       "      <td>915.995925</td>\n",
       "      <td>weathersit_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>839.987713</td>\n",
       "      <td>785.637577</td>\n",
       "      <td>season_4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>776.592967</td>\n",
       "      <td>769.671660</td>\n",
       "      <td>mnth_9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>413.961130</td>\n",
       "      <td>387.101857</td>\n",
       "      <td>weathersit_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>335.218767</td>\n",
       "      <td>333.560279</td>\n",
       "      <td>mnth_5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>307.860502</td>\n",
       "      <td>350.151176</td>\n",
       "      <td>mnth_6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>238.607786</td>\n",
       "      <td>226.845718</td>\n",
       "      <td>weekday_6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>221.598038</td>\n",
       "      <td>256.863912</td>\n",
       "      <td>mnth_8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>213.377427</td>\n",
       "      <td>211.632297</td>\n",
       "      <td>workingday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>194.398815</td>\n",
       "      <td>165.644880</td>\n",
       "      <td>mnth_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>182.474431</td>\n",
       "      <td>214.601897</td>\n",
       "      <td>mnth_10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>76.749983</td>\n",
       "      <td>99.610371</td>\n",
       "      <td>season_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>75.287884</td>\n",
       "      <td>82.727094</td>\n",
       "      <td>weekday_5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>64.465256</td>\n",
       "      <td>60.886904</td>\n",
       "      <td>weekday_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>52.907066</td>\n",
       "      <td>60.605254</td>\n",
       "      <td>weekday_4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>48.757131</td>\n",
       "      <td>11.861976</td>\n",
       "      <td>mnth_4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>-35.279334</td>\n",
       "      <td>-33.270528</td>\n",
       "      <td>weekday_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-137.876425</td>\n",
       "      <td>-82.562667</td>\n",
       "      <td>season_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>-193.271274</td>\n",
       "      <td>-192.433551</td>\n",
       "      <td>weekday_0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>-202.717383</td>\n",
       "      <td>-205.360892</td>\n",
       "      <td>weekday_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>-258.713938</td>\n",
       "      <td>-246.044464</td>\n",
       "      <td>holiday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>-275.895678</td>\n",
       "      <td>-313.929385</td>\n",
       "      <td>mnth_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>-293.012896</td>\n",
       "      <td>-233.926872</td>\n",
       "      <td>mnth_7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-350.267803</td>\n",
       "      <td>-406.235317</td>\n",
       "      <td>mnth_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>-563.610563</td>\n",
       "      <td>-550.189791</td>\n",
       "      <td>mnth_11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>-584.113711</td>\n",
       "      <td>-598.074416</td>\n",
       "      <td>mnth_12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-778.861271</td>\n",
       "      <td>-802.685281</td>\n",
       "      <td>season_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>-1199.338650</td>\n",
       "      <td>-1082.382047</td>\n",
       "      <td>windspeed</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>-1317.780691</td>\n",
       "      <td>-1303.097781</td>\n",
       "      <td>weathersit_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>-1361.378613</td>\n",
       "      <td>-1130.658283</td>\n",
       "      <td>hum</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        coef_lr   coef_ridge       columns\n",
       "26  2530.670058  1791.118786          temp\n",
       "32  2019.092555  2019.888220            yr\n",
       "27  1096.625843  1546.564606         atemp\n",
       "16   903.819561   915.995925  weathersit_1\n",
       "3    839.987713   785.637577      season_4\n",
       "12   776.592967   769.671660        mnth_9\n",
       "17   413.961130   387.101857  weathersit_2\n",
       "8    335.218767   333.560279        mnth_5\n",
       "9    307.860502   350.151176        mnth_6\n",
       "25   238.607786   226.845718     weekday_6\n",
       "11   221.598038   256.863912        mnth_8\n",
       "31   213.377427   211.632297    workingday\n",
       "6    194.398815   165.644880        mnth_3\n",
       "13   182.474431   214.601897       mnth_10\n",
       "1     76.749983    99.610371      season_2\n",
       "24    75.287884    82.727094     weekday_5\n",
       "22    64.465256    60.886904     weekday_3\n",
       "23    52.907066    60.605254     weekday_4\n",
       "7     48.757131    11.861976        mnth_4\n",
       "21   -35.279334   -33.270528     weekday_2\n",
       "2   -137.876425   -82.562667      season_3\n",
       "19  -193.271274  -192.433551     weekday_0\n",
       "20  -202.717383  -205.360892     weekday_1\n",
       "30  -258.713938  -246.044464       holiday\n",
       "5   -275.895678  -313.929385        mnth_2\n",
       "10  -293.012896  -233.926872        mnth_7\n",
       "4   -350.267803  -406.235317        mnth_1\n",
       "14  -563.610563  -550.189791       mnth_11\n",
       "15  -584.113711  -598.074416       mnth_12\n",
       "0   -778.861271  -802.685281      season_1\n",
       "29 -1199.338650 -1082.382047     windspeed\n",
       "18 -1317.780691 -1303.097781  weathersit_3\n",
       "28 -1361.378613 -1130.658283           hum"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 看看各特征的权重系数，系数的绝对值大小可视为该特征的重要性\n",
    "fs = pd.DataFrame({\"columns\":list(feat_names), \"coef_lr\":list((lr.coef_.T)), \"coef_ridge\":list((ridge.coef_.T))})\n",
    "fs.sort_values(by=['coef_lr'],ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The RMSE score of LassoCV on test is 801.772009359\n",
      "The RMSE score of LassoCV on train is 750.333880914\n"
     ]
    }
   ],
   "source": [
    "#### Lasso／L1正则\n",
    "# class sklearn.linear_model.LassoCV(eps=0.001, n_alphas=100, alphas=None, fit_intercept=True, \n",
    "#                                    normalize=False, precompute=’auto’, max_iter=1000, \n",
    "#                                    tol=0.0001, copy_X=True, cv=None, verbose=False, n_jobs=1,\n",
    "#                                    positive=False, random_state=None, selection=’cyclic’)\n",
    "from sklearn.linear_model import LassoCV\n",
    "\n",
    "#1. 设置超参数搜索范围\n",
    "#alphas = [ 0.01, 0.1, 1, 10,100]\n",
    "\n",
    "#2. 生成学习器实例\n",
    "#lasso = LassoCV(alphas=alphas)\n",
    "\n",
    "#1. 设置超参数搜索范围\n",
    "#Lasso可以自动确定最大的alpha，所以另一种设置alpha的方式是设置最小的alpha值（eps） 和 超参数的数目（n_alphas），\n",
    "#然后LassoCV对最小值和最大值之间在log域上均匀取值n_alphas个\n",
    "# np.logspace(np.log10(alpha_max * eps), np.log10(alpha_max),num=n_alphas)[::-1]\n",
    "\n",
    "#2 生成LassoCV实例（默认超参数搜索范围）\n",
    "lasso = LassoCV()  \n",
    "\n",
    "#3. 训练（内含CV）\n",
    "lasso.fit(X_train, y_train)  \n",
    "\n",
    "#4. 测试\n",
    "y_test_pred_lasso = lasso.predict(X_test)\n",
    "y_train_pred_lasso = lasso.predict(X_train)\n",
    "\n",
    "\n",
    "# 评估，使用RMSE_score评价模型在测试集和训练集上的性能\n",
    "print 'The RMSE score of LassoCV on test is', math.sqrt(mean_squared_error(y_test, y_test_pred_lasso))\n",
    "print 'The RMSE score of LassoCV on train is', math.sqrt(mean_squared_error(y_train, y_train_pred_lasso))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaEAAAEKCAYAAAC7c+rvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8XXWd//HXJ3vXpEvoknQDCqWFtrShFkFlUwqDFhQU\nfjNSEQdHYVxmHAXn5+A2/vThNoOjzODAAOpYEFCqgqXsuFBI09I2lLahpW26pm2Wbtk/vz/uN+U2\nJM1tyM259+b9fDzu4577Pd9zvp/jrXlzlnuOuTsiIiJRyIq6ABERGbgUQiIiEhmFkIiIREYhJCIi\nkVEIiYhIZBRCIiISGYWQiIhERiEkIiKRUQiJiEhkcqIuINWNHj3aJ0+eHHUZIiJpZcWKFXvdvbin\nfgqhHkyePJny8vKoyxARSStmtiWRfjocJyIikVEIiYhIZBRCIiISGYWQiIhERiEkIiKRUQiJiEhk\nFEIiIhIZhZCIiLzFvz25gRVb9id9HP1YVUREjvHKtjr+7cmNGMbcSSOTOpb2hERE5Bjfe2I9I4fk\nceO7piR9LIWQiIgc9ZfX9/HCxr18+oJTGJqf/INlCiEREQHA3fneE+sZO7y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mtm93bM60H8Pbk67kbexpv/v/88sJvYHloW0BjXvyDUIJJUOhwnknzP\nAx8xs+xwnubdwEvAH4k9tC/LzMYQu3Foh3XAqWF6OHAIqA/9LutmnCxiN7IE+D9h/cdTCOwMe2If\nJXYj2Q6nAWsT2DaRt0V7QiLJ92ti53teIbZ38kV332VmDwMXE/tjv4HY0zLrwzK/JxZKT7r7K2a2\nEqgENgF/6macQ8AMM1sR1vORHur6CfCwmV0DPBOW73BhqEEkqXQXbZEImdlQdz9oZqOI7R2dFwJq\nELFgOC+cS0pkXQfdfWgf1fU8sNDda/tifSLd0Z6QSLR+Z2ZFQB7wDXffBeDuR8zsdqAE2NqfBYVD\nhj9QAEl/0J6QiIhERhcmiIhIZBRCIiISGYWQiIhERiEkIiKRUQiJiEhkFEIiIhKZ/w/iSZ3KCXwZ\njgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x111e19e8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('alpha is:', 3.8231073883387401)\n"
     ]
    }
   ],
   "source": [
    "mses = np.mean(lasso.mse_path_, axis = 1)\n",
    "plt.plot(np.log10(lasso.alphas_), mses) \n",
    "#plt.plot(np.log10(lasso.alphas_)*np.ones(3), [0.3, 0.4, 1.0])\n",
    "plt.xlabel('log(alpha)')\n",
    "plt.ylabel('mse')\n",
    "plt.show()    \n",
    "            \n",
    "print ('alpha is:', lasso.alpha_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>coef_lasso</th>\n",
       "      <th>coef_lr</th>\n",
       "      <th>coef_ridge</th>\n",
       "      <th>columns</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>2697.696415</td>\n",
       "      <td>2530.670058</td>\n",
       "      <td>1791.118786</td>\n",
       "      <td>temp</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>2018.064425</td>\n",
       "      <td>2019.092555</td>\n",
       "      <td>2019.888220</td>\n",
       "      <td>yr</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>857.276640</td>\n",
       "      <td>1096.625843</td>\n",
       "      <td>1546.564606</td>\n",
       "      <td>atemp</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>536.983755</td>\n",
       "      <td>903.819561</td>\n",
       "      <td>915.995925</td>\n",
       "      <td>weathersit_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>579.808352</td>\n",
       "      <td>839.987713</td>\n",
       "      <td>785.637577</td>\n",
       "      <td>season_4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>578.493208</td>\n",
       "      <td>776.592967</td>\n",
       "      <td>769.671660</td>\n",
       "      <td>mnth_9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>-0.000000</td>\n",
       "      <td>413.961130</td>\n",
       "      <td>387.101857</td>\n",
       "      <td>weathersit_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>207.991241</td>\n",
       "      <td>335.218767</td>\n",
       "      <td>333.560279</td>\n",
       "      <td>mnth_5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>163.689798</td>\n",
       "      <td>307.860502</td>\n",
       "      <td>350.151176</td>\n",
       "      <td>mnth_6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>2.953440</td>\n",
       "      <td>238.607786</td>\n",
       "      <td>226.845718</td>\n",
       "      <td>weekday_6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>221.598038</td>\n",
       "      <td>256.863912</td>\n",
       "      <td>mnth_8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>52.602592</td>\n",
       "      <td>213.377427</td>\n",
       "      <td>211.632297</td>\n",
       "      <td>workingday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>191.328356</td>\n",
       "      <td>194.398815</td>\n",
       "      <td>165.644880</td>\n",
       "      <td>mnth_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>222.295825</td>\n",
       "      <td>182.474431</td>\n",
       "      <td>214.601897</td>\n",
       "      <td>mnth_10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3.475120</td>\n",
       "      <td>76.749983</td>\n",
       "      <td>99.610371</td>\n",
       "      <td>season_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>15.695535</td>\n",
       "      <td>75.287884</td>\n",
       "      <td>82.727094</td>\n",
       "      <td>weekday_5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>64.465256</td>\n",
       "      <td>60.886904</td>\n",
       "      <td>weekday_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>52.907066</td>\n",
       "      <td>60.605254</td>\n",
       "      <td>weekday_4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>-0.000000</td>\n",
       "      <td>48.757131</td>\n",
       "      <td>11.861976</td>\n",
       "      <td>mnth_4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>-48.560524</td>\n",
       "      <td>-35.279334</td>\n",
       "      <td>-33.270528</td>\n",
       "      <td>weekday_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-75.481436</td>\n",
       "      <td>-137.876425</td>\n",
       "      <td>-82.562667</td>\n",
       "      <td>season_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>-355.511941</td>\n",
       "      <td>-193.271274</td>\n",
       "      <td>-192.433551</td>\n",
       "      <td>weekday_0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>-226.821264</td>\n",
       "      <td>-202.717383</td>\n",
       "      <td>-205.360892</td>\n",
       "      <td>weekday_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>-301.730848</td>\n",
       "      <td>-258.713938</td>\n",
       "      <td>-246.044464</td>\n",
       "      <td>holiday</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>-134.707884</td>\n",
       "      <td>-275.895678</td>\n",
       "      <td>-313.929385</td>\n",
       "      <td>mnth_2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>-429.042641</td>\n",
       "      <td>-293.012896</td>\n",
       "      <td>-233.926872</td>\n",
       "      <td>mnth_7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-219.126671</td>\n",
       "      <td>-350.267803</td>\n",
       "      <td>-406.235317</td>\n",
       "      <td>mnth_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>-416.014413</td>\n",
       "      <td>-563.610563</td>\n",
       "      <td>-550.189791</td>\n",
       "      <td>mnth_11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>-446.566688</td>\n",
       "      <td>-584.113711</td>\n",
       "      <td>-598.074416</td>\n",
       "      <td>mnth_12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-1023.160420</td>\n",
       "      <td>-778.861271</td>\n",
       "      <td>-802.685281</td>\n",
       "      <td>season_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>-1012.098234</td>\n",
       "      <td>-1199.338650</td>\n",
       "      <td>-1082.382047</td>\n",
       "      <td>windspeed</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>-1656.938823</td>\n",
       "      <td>-1317.780691</td>\n",
       "      <td>-1303.097781</td>\n",
       "      <td>weathersit_3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>-1004.243380</td>\n",
       "      <td>-1361.378613</td>\n",
       "      <td>-1130.658283</td>\n",
       "      <td>hum</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     coef_lasso      coef_lr   coef_ridge       columns\n",
       "26  2697.696415  2530.670058  1791.118786          temp\n",
       "32  2018.064425  2019.092555  2019.888220            yr\n",
       "27   857.276640  1096.625843  1546.564606         atemp\n",
       "16   536.983755   903.819561   915.995925  weathersit_1\n",
       "3    579.808352   839.987713   785.637577      season_4\n",
       "12   578.493208   776.592967   769.671660        mnth_9\n",
       "17    -0.000000   413.961130   387.101857  weathersit_2\n",
       "8    207.991241   335.218767   333.560279        mnth_5\n",
       "9    163.689798   307.860502   350.151176        mnth_6\n",
       "25     2.953440   238.607786   226.845718     weekday_6\n",
       "11     0.000000   221.598038   256.863912        mnth_8\n",
       "31    52.602592   213.377427   211.632297    workingday\n",
       "6    191.328356   194.398815   165.644880        mnth_3\n",
       "13   222.295825   182.474431   214.601897       mnth_10\n",
       "1      3.475120    76.749983    99.610371      season_2\n",
       "24    15.695535    75.287884    82.727094     weekday_5\n",
       "22     0.000000    64.465256    60.886904     weekday_3\n",
       "23     0.000000    52.907066    60.605254     weekday_4\n",
       "7     -0.000000    48.757131    11.861976        mnth_4\n",
       "21   -48.560524   -35.279334   -33.270528     weekday_2\n",
       "2    -75.481436  -137.876425   -82.562667      season_3\n",
       "19  -355.511941  -193.271274  -192.433551     weekday_0\n",
       "20  -226.821264  -202.717383  -205.360892     weekday_1\n",
       "30  -301.730848  -258.713938  -246.044464       holiday\n",
       "5   -134.707884  -275.895678  -313.929385        mnth_2\n",
       "10  -429.042641  -293.012896  -233.926872        mnth_7\n",
       "4   -219.126671  -350.267803  -406.235317        mnth_1\n",
       "14  -416.014413  -563.610563  -550.189791       mnth_11\n",
       "15  -446.566688  -584.113711  -598.074416       mnth_12\n",
       "0  -1023.160420  -778.861271  -802.685281      season_1\n",
       "29 -1012.098234 -1199.338650 -1082.382047     windspeed\n",
       "18 -1656.938823 -1317.780691 -1303.097781  weathersit_3\n",
       "28 -1004.243380 -1361.378613 -1130.658283           hum"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 看看各特征的权重系数，系数的绝对值大小可视为该特征的重要性\n",
    "fs = pd.DataFrame({\"columns\":list(feat_names), \"coef_lr\":list((lr.coef_.T)), \"coef_ridge\":list((ridge.coef_.T)), \"coef_lasso\":list((lasso.coef_.T))})\n",
    "fs.sort_values(by=['coef_lr'],ascending=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "#  比较用上述三种模型得到的各特征的系数。\n",
    "由之前的数据探索可以了解到，体感温度和温度高度相关，目标cnt与温度正相关，并且2012年的骑行量比2011年的骑行量大很多，所以正系数比较大的参数主要是这三个。湿度和风速与目标cnt负相关，天气恶劣的时候骑行数大大减小，占据了负系数的大头。\n",
    "此外，可以看到L1正则的Lasso果然将许多参数收缩到0，而最小二乘得到的参数权重整体要大于其他两个。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "        lasso          lr       ridge\n",
      "0  750.333881  745.119133  746.292902\n",
      "1  801.772009  814.854809  811.417221\n"
     ]
    }
   ],
   "source": [
    "#0为训练集，1为测试集\n",
    "RMSE_score = pd.DataFrame({\"lr\":[math.sqrt(mean_squared_error(y_train, y_train_pred_lr)),math.sqrt(mean_squared_error(y_test, y_test_pred_lr))],\"lasso\":[math.sqrt(mean_squared_error(y_train, y_train_pred_lasso)),math.sqrt(mean_squared_error(y_test, y_test_pred_lasso))],\"ridge\":[math.sqrt(mean_squared_error(y_train, y_train_pred_ridge)),math.sqrt(mean_squared_error(y_test, y_test_pred_ridge))]})\n",
    "print(RMSE_score)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#  比较各模型在测试集上的性能。\n",
    "可以看到在lr虽然在训练集表现最好，但是由于缺乏正则项，其在测试集的效果反而不如其他两个，lasso由于将较无关变量的权重约束为0在测试集和训练集中都有不错的性能。"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
